import React, {  } from 'react';
import { Alert, Dimensions, StyleSheet, Text, TouchableHighlight, TouchableOpacity, TouchableWithoutFeedback, View } from 'react-native';

//触控组件练习
const TouchablePage = () => {


    return (
        <View style={[styles.root]}>

            <TouchableHighlight onPress={() => {
                Alert.alert('触碰高亮显示')
            }}>
                <Text>触碰高亮显示</Text>
            </TouchableHighlight>

            <TouchableOpacity onPress={() => {
                Alert.alert('触碰透明度变化')
            }}>
                <Text>触碰透明度变化</Text>
            </TouchableOpacity>

            <TouchableWithoutFeedback onPress={() => {
                Alert.alert('触碰没反应显示')
            }}>
                <Text>触碰没反应显示</Text>
            </TouchableWithoutFeedback>

        </View>
    );
};

const styles = StyleSheet.create({
    root: {
        justifyContent: "center",
        alignItems: "center",
        height: Dimensions.get('window').height
    },

})

export default TouchablePage;
